<extend name="./public/frame.html"/>
<block name="content">
    <style>
        .layui-form-label{width: 10%;}
        .layui-input-block{margin-left: 12%;}
    </style>
    <form class="layui-form layui-form-pane1" action="" method="post" enctype="multipart/form-data">

        <div class="layui-form-item">
            <label class="layui-form-label">所属城市</label>
            <div class="layui-input-block">
                <span style="line-height:38px;">{$data.region_name}</span>
                <!--<input type="text" name="name" lay-verify="required" placeholder=""
                       value="{$data.region_name}" autocomplete="off" class="layui-input">-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车辆种类名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" placeholder="车辆种类名称"
                       value="{$data.name}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标识符</label>
            <div class="layui-input-block">
                <input type="text" name="nid" lay-verify="required" placeholder="标识符"
                       value="{$data.nid}" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="is_open" value="1" title="显示" <if condition="$data.is_open eq 1">checked</if>>
                <input type="radio" name="is_open" value="0" title="隐藏" <if condition="$data.is_open eq 0">checked</if>>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="sort" lay-verify="required" placeholder="排序"
                       autocomplete="off" class="layui-input" value="{$data.sort}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" value="{$data.id}" name="id">
                <input type="hidden" value="{$data.region_id}" name="region_id">
                <button class="layui-btn" lay-submit lay-filter="submit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
    <script>
        layui.use(['form'], function () {
            form = layui.form;
            //监听提交
            form.on('submit(submit)', function (data) {

            });

        });
    </script>
</block>
